<?php
/**
 * Created by PhpStorm.
 * User: root
 * Date: 7/22/14
 * Time: 10:18 AM
 */

namespace User\Form;

use Zend\Form\Form;
use Zend\Form\Element;
use Base\Form\ProvidesEventsForm;


class Base extends ProvidesEventsForm
{
    public function __construct()
    {
        parent::__construct();

        $this->add(array(
            'name' => 'firstname',
            'options' => array(
                'label' => 'First name',
            ),
            'attributes' => array(
                'type' => 'text',
                'class' => 'form-control col-xs-12',
                'placeholder' => 'First name'
            ),
        ));

        $this->add(array(
            'name' => 'lastname',
            'options' => array(
                'label' => 'Last name',
            ),
            'attributes' => array(
                'type' => 'text',
                'class' => 'form-control col-xs-12',
                'placeholder' => 'Last name'
            ),
        ));


        $this->add(array(
            'name' => 'email',
            'options' => array(
                'label' => 'Email',
            ),
            'attributes' => array(
                'type' => 'text',
                'class' => 'form-control col-xs-12',
                'placeholder' => 'Email'
            ),
        ));


        $this->add(array(
            'name' => 'password',
            'options' => array(
                'label' => 'Password',
            ),
            'attributes' => array(
                'type' => 'password',
                'class' => 'form-control col-xs-12',
                'placeholder' => 'password'
            ),
        ));

        $this->add(array(
            'name' => 'password_verify',
            'options' => array(
                'label' => 'Password Verify',
            ),
            'attributes' => array(
                'type' => 'password',
                'class' => 'form-control col-xs-12',
                'placeholder' => 'password verify'
            ),
        ));

        /*
        if ($this->getRegistrationoptions()->getUseRegistrationFormCaptcha()) {
            $this->add(array(
                'name' => 'captcha',
                'type' => 'Zend\Form\Element\Captcha',
                'options' => array(
                    'label' => 'Please type the following text',
                    'captcha' => $this->getRegistrationoptions()->getFormCaptchaoptions(),
                ),
            ));
        }*/

        $submitElement = new Element\Button('submit');
        $submitElement
            ->setLabel('Submit')
            ->setAttributes(array(
                'type'  => 'submit',
                'class' => 'btn btn-primary'
            ));

        $this->add($submitElement, array(
            'priority' => -100,
        ));

        $this->add(array(
            'name' => 'user_id',
            'type' => 'Zend\Form\Element\Hidden',
            'attributes' => array(
                'type' => 'hidden'
            ),
        ));

    }
} 